package com.util;

public class CommandGeneratorUnit {
    private static final int HASH_LEN = 32; // Example length, adjust as necessary

    public static String getcommInt(int inputK) {
        String getCommand = "get ";
        getCommand += Integer.toString(inputK);
        return getCommand;
    }

    public static String getComm(byte[] inputK, int klen) {
        byte[] EK = new byte[10 * HASH_LEN];
        String getCommand = "get ";

        encode(EK, inputK, klen); // Assume this method exists
        getCommand += byteToStr(EK, 2 * klen); // Assume this method exists

        return getCommand;
    }

    private static void encode(byte[] EK, byte[] inputK, int klen) {
        // Implement encoding logic here
    }

    private static String byteToStr(byte[] source, int clen) {
        StringBuilder str = new StringBuilder();
        for (int i = 0; i < clen; i++) {
            str.append((char) source[i]);
        }
        return str.toString();
    }


    public static void main(String[] args) {
        int inputK = 123;
        String command = getcommInt(inputK);
        System.out.println(command); // 输出: get 123
    }
}
